#ifndef SDLMAP_H
#define SDLMAP_H

#pragma warning(disable: 4290)
#pragma warning(disable: 4018)

class sdlmap_error : public std::logic_error 
{
public:
	sdlmap_error(const std::string &error) : logic_error(error) { }
};
class SDLMap
{
private:
       struct SDL_Surface *map_;
       struct SDL_Surface *tile_;
       struct SDL_Rect trect_;
       struct SDL_Rect mrect_;
       class Location *loc_;
public:
       SDLMap(class Location *loc, struct SDL_Surface *) throw(sdlmap_error);
       ~SDLMap() throw(sdlmap_error);
       void render(struct SDL_Surface *) throw(sdlmap_error);
       bool walkable(int mouseX, int mouseY);
       void getTileXY(int &x, int &y);
       void getTileScreenXY(int &x, int &y);
       void addItem(class Item *item);
       bool containsItem(int tileX, int tileY);
};
#endif